*** Settings ***
Documentation  用户相关操作
Library    SeleniumLibrary

*** keywords ***
#用户可以自定义关键字
点击登录链接
    Click Element   xpath://*[@href="/signin"]
使用用户名密码进行用户登录
    [Arguments]    ${username}    ${password}           #定义username，password两个参数
    Input Text  //*[@id="name"]     ${username}
    Input Text  //*[@id="pass"]     ${password}
    Click Element   xpath://*[@type="submit"]
用户应该登录成功
    [Arguments]    ${username}
    Element Text Should Be  //span[@class="user_name"]//a[@class="dark"]     ${username}
用户应该登录失败
    [Arguments]    ${error_tip_msg}
    Element Text Should Be  //strong     ${error_tip_msg}